home *** CD-ROM | disk | FTP | other *** search
- /*
- OPAL 30 FRAME STORY BOARD
- By J.L. White
- ©1994 Merlin's Software
-
- Convert Frames To Story Board Screen
- Opal Paint Script
- Requires The Rexxarplib.library
-
- Batch Factory Batch Conversion Scripts are basically Arexx scripts that
- allow you to pass certain parameters to the external program you wish
- to use to convert the images from one format to another. You can pass
- five different strings from Batch Factory to the script by using the
- following commands:
-
- $N = This will pass the current selected filename.
- $P = This will tell Batch Factory to ask for a path to save new frames to.
- $# = This will pass the current frame number in the script.
- $T = This will pass the total number of frames in the script.
- $A = This will pass an offset number to be used to save frames with.
-
- NOTE: The following line is required to work as a Batch Factory Script:
-
- PARSE=$N $# $T
-
- */
-
- options results
- call Locate_OpalPaint
- if ~show('l', "rexxarplib.library") then do
- check = addlib('rexxsupport.library',0,-30,0)
- check = addlib('rexxarplib.library',0,-30,0)
- end
- address "OpalPaint_Rexx"
- arg InPic FrameNum TotalFiles
- if TotalFiles > 30 then do
- Okay "You Can Only Select 30 Frames Max!\nPlease Abort & Try Again!"
- Key "AMIGA w"
- address command "wait 1"
- call ScreenToFront("Batch")
- address command "wait 3"
- exit
- end
- if FrameNum = 1 then do
- SaveSetUp
- SetPrefs 1024
- AskBool "Select Save Format You Wish To Use?\n\n Select [OK] For IFF \n\n Select [CANCEL] For JPEG"
- if Result=0 then do
- AskProp 1 100 84 "Enter JPEG Compression Value (1 - 100)!"
- Format = JPEG Result
- end
- else
- Format = IFF
- Saver Format
- AskFileName 'Enter Name For StoryBoard! RAM: '
- Name = result
- call open OutData,"RAM:OSB.Temp",'W'
- call writeln OutData,Name
- call close OutData
- StoryX = 28
- StoryY = 29
- AddPage 640 400 HIRES INTERLACE
- CurrPage
- PageNum = result
- SecondaryPage PageNum
- Key "j"
- Okay "Select Background Color Then Click Ok!"
- SolidRect 0 0 640 400
- Okay "Select Border & Text Color Then Click Ok!"
- ActivePot
- TextColor = Result
- Text = "Story Board For "OutPic" With Frames #"right(FrameNum,3,'0')" - #"right(TotalFiles,3,'0')
- Len = ((78-(Length(Text)))/2) * 8
- ActiveBrush 2
- MakeText 'topaz 8 2 'Text
- Handle 0 0
- PutBrush Len 10
- Temp = FrameNum
- key "F10"
- do FrameNum = 1 To TotalFiles
- call XYSet
- SolidRect StoryX-2 StoryY-2 StoryX+83 StoryY+52
- ActiveBrush 2
- Handle 0 0
- MakeText 'topaz 8 2 Frame #'right(FrameNum,3,'0')
- PutBrush StoryX+38 StoryY+61
- end
- FrameNum = Temp
- key "F10"
- Key "j"
- end
- Load InPic
- ActiveBrush 1
- PageSize
- Parse var Result Width Height
- RectCut 0 0 Width Height
- RescaleMethod Smooth1
- Resize 83 52
- Key "j"
- Key "F10"
- ActiveBrush 1
- ColorSource MULTICOLOR
- Handle 0 0
- call XYSet
- PutBrush StoryX StoryY
- if FrameNum = TotalFiles then do
- call open InData,"RAM:OSB.Temp",'R'
- Name = readln(InData)
- call close InData
- address command "C:Delete >NIL: RAM:OSB.Temp"
- Save Name
- SecondaryPage
- DeletePage result
- RestoreSetUp
- Key "AMIGA w"
- address command "wait 1"
- end
- else do
- Key "F10"
- Key "j"
- end
- exit
-
- Locate_OpalPaint:
- if (POS('OpalPaint_Rexx',SHOW('Ports')) = 0)
- then do
- address command 'run < nil: > nil: OpalPaint:OpalPaint -q'
- address command 'wait 5'
- end
- return
-
- XYSet:
- if FrameNum = 1 then do
- StoryX = 28
- StoryY = 29
- end
- if FrameNum = 2 then do
- StoryX = 128
- StoryY = 29
- end
- if FrameNum = 3 then do
- StoryX = 228
- StoryY = 29
- end
- if FrameNum = 4 then do
- StoryX = 328
- StoryY = 29
- end
- if FrameNum = 5 then do
- StoryX = 428
- StoryY = 29
- end
- if FrameNum = 6 then do
- StoryX = 528
- StoryY = 29
- end
- if FrameNum = 7 then do
- StoryX = 28
- StoryY = 103
- end
- if FrameNum = 8 then do
- StoryX = 128
- StoryY = 103
- end
- if FrameNum = 9 then do
- StoryX = 228
- StoryY = 103
- end
- if FrameNum = 10 then do
- StoryX = 328
- StoryY = 103
- end
- if FrameNum = 11 then do
- StoryX = 428
- StoryY = 103
- end
- if FrameNum = 12 then do
- StoryX = 528
- StoryY = 103
- end
- if FrameNum = 13 then do
- StoryX = 28
- StoryY = 177
- end
- if FrameNum = 14 then do
- StoryX = 128
- StoryY = 177
- end
- if FrameNum = 15 then do
- StoryX = 228
- StoryY = 177
- end
- if FrameNum = 16 then do
- StoryX = 328
- StoryY = 177
- end
- if FrameNum = 17 then do
- StoryX = 428
- StoryY = 177
- end
- if FrameNum = 18 then do
- StoryX = 528
- StoryY = 177
- end
- if FrameNum = 19 then do
- StoryX = 28
- StoryY = 251
- end
- if FrameNum = 20 then do
- StoryX = 128
- StoryY = 251
- end
- if FrameNum = 21 then do
- StoryX = 228
- StoryY = 251
- end
- if FrameNum = 22 then do
- StoryX = 328
- StoryY = 251
- end
- if FrameNum = 23 then do
- StoryX = 428
- StoryY = 251
- end
- if FrameNum = 24 then do
- StoryX = 528
- StoryY = 251
- end
- if FrameNum = 25 then do
- StoryX = 28
- StoryY = 325
- end
- if FrameNum = 26 then do
- StoryX = 128
- StoryY = 325
- end
- if FrameNum = 27 then do
- StoryX = 228
- StoryY = 325
- end
- if FrameNum = 28 then do
- StoryX = 328
- StoryY = 325
- end
- if FrameNum = 29 then do
- StoryX = 428
- StoryY = 325
- end
- if FrameNum = 30 then do
- StoryX = 528
- StoryY = 325
- end
- return
-